<template>
  <view class="container">
    <!-- 余额 -->
    <image src="../../static/img/walltbgc.png" mode="aspectFill" class="bgc"></image>
    <view class="money">
      <view>
        <view>余额(元)</view>
        <view style="margin-top: 18rpx; font-size: 40rpx; font-family: PingFang SC, PingFang SC; font-weight: bold">2000.00</view>
      </view>
      <view class="tixian" @click="tixian">提现</view>
    </view>
    <!-- navbar切换 -->
    <view class="navbarbox">
      <view :class="{ common: index == 0 }" @click="index = 0">收支明细</view>
      <view :class="{ common: index == 1 }" @click="index = 1">提现记录</view>
    </view>
    <!-- 收支明细列表 -->
    <view class="leftlist" v-if="index == 0">
      <view class="leftitem" v-for="index in 3" :key="index">
        <view>
          <view style="font-size: 28rpx; font-family: PingFang SC, PingFang SC; font-weight: bold; color: #333333">预约课时200</view>
          <view style="font-size: 26rpx; font-family: PingFang SC, PingFang SC; font-weight: 500; color: #999999; margin-top: 12rpx">2023-12-12 20:00:00</view>
        </view>
        <view :class="{ colorstatus: true }" style="font-size: 36rpx; font-family: PingFang SC, PingFang SC; font-weight: bold">+￥200</view>
      </view>
    </view>
    <!-- 提现记录 -->
    <view class="leftlist" v-if="index == 1">
      <view class="leftitem" v-for="index in 3" :key="index">
        <view>
          <view style="font-size: 28rpx; font-family: PingFang SC, PingFang SC; font-weight: bold; color: #333333">提现到微信</view>
          <view style="font-size: 26rpx; font-family: PingFang SC, PingFang SC; font-weight: 500; color: #999999; margin-top: 12rpx">2023-12-12 20:00:00</view>
        </view>
        <view :class="{ colorstatus: false }" style="font-size: 36rpx; font-family: PingFang SC, PingFang SC; font-weight: bold">-￥200</view>
      </view>
    </view>
  </view>
</template>

<script>
export default {
  data() {
    return {
      index: 0
    };
  },
  methods: {
    // 跳转到提现页面
    tixian() {
      uni.navigateTo({
        url: '/sub_user/tixian/tixian'
      });
    }
  }
};
</script>

<style lang="scss" scoped>
page {
  background-color: #f9f9f9;
}
.container {
  box-sizing: border-box;
  .bgc {
    width: 712rpx;
    height: 302rpx;
    margin: 30rpx 20rpx;
  }
  .money {
    box-sizing: border-box;
    position: absolute;
    display: flex;
    align-items: center;
    width: 712rpx;
    margin-left: 20rpx;
    padding: 0 40rpx 0 50rpx;
    justify-content: space-between;
    color: #ffffff;
    top: 120rpx;
    left: 0rpx;
    .tixian {
      box-sizing: border-box;
      width: 140rpx;
      height: 72rpx;
      text-align: center;
      line-height: 72rpx;
      background: #2142e5;
      border-radius: 100rpx 100rpx 100rpx 100rpx;
    }
  }
  .navbarbox {
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    font-size: 28rpx;
    font-family: PingFang SC, PingFang SC;
    font-weight: 500;
    color: #333333;
  }
  .common {
    font-size: 30rpx;
    font-family: PingFang SC, PingFang SC;
    font-weight: bold;
    color: #3553e8;
    padding-bottom: 6rpx;
    border-bottom: 8rpx solid #3553e8;
  }
  .leftitem {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 710rpx;
    height: 132rpx;
    margin: 20rpx;
    padding: 22rpx 30rpx;
    background: #ffffff;
    border-radius: 20rpx 20rpx 20rpx 20rpx;
  }
  .colorstatus {
    color: #3553e8;
  }
}
</style>
